/*
 * Copyright (c)  小马哥. 2022-2024. All rights reserved.
 *
 */

package com.phsms.common.sensitive.demo.service;

import com.phsms.common.sensitive.demo.entity.SensitiveEntity;
import com.phsms.common.sensitive.annotation.Desensitization;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.LinkedList;
import java.util.List;

/**
 * 敏感接口实现类
 *
 * @author Mar
 * @date 2023年1月10日
 */
@Service
@Slf4j
public class SensitiveService {
    /**
     * 数据加密测试
     */
    @Desensitization
    public List<SensitiveEntity> listData() {
        List<SensitiveEntity> list = new LinkedList<SensitiveEntity>();
        SensitiveEntity sensitiveEntity = new SensitiveEntity();
        sensitiveEntity.setName("张三");
        sensitiveEntity.setMobile("13822987786");
        sensitiveEntity.setIdCard("630201199809080766");
        list.add(sensitiveEntity);
        SensitiveEntity sensitiveEntity2 = new SensitiveEntity();
        sensitiveEntity2.setName("李梅梅");
        sensitiveEntity2.setMobile("18822092211");
        sensitiveEntity2.setIdCard("630102198808760510");
        list.add(sensitiveEntity2);
        SensitiveEntity sensitiveEntity3 = new SensitiveEntity();
        sensitiveEntity3.setName("迪丽热巴");
        sensitiveEntity3.setMobile("19956778976");
        sensitiveEntity3.setIdCard("650100199809080220");
        list.add(sensitiveEntity3);
        return list;
    }
}
